<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body>
<br/>#标签: <br/>
<span th:id="${userPO.id}">th:id</span><br/>
<span th:text="${html}">th:text</span><br/>
<span th:utext="${html}">th:utext</span><br/>
<input th:value="${userPO.name}"/><br/>
<div th:with="isEven=${userPO.id}%2==0"></div>
<div th:with="isEven=${userPO.id}%2!=0"></div>

<br/>#字符串: <br/>
<span th:text="'userPO.name: ' + ${userPO.name}"></span><br/>
<span th:text="|userPO.name: ${userPO.name}|"></span><br/>

<br/>#国际化: <br/>
<span th:text="#{country.name}"></span><br/>

<br/>#格式化: <br/>
<span th:text="${#numbers.formatDecimal(userPO.salary, 1, 2)}"></span><br/>
<span th:text="${#calendars.format(userPO.birthday,'yyyy-MM-dd')}"></span><br/>

<br/>#链接: <br/>
<a th:href="@{/userPO/query(id=${userPO.id})}">链接:href</a><br/>

<br/>#对象: <br/>
<div th:object="${userPO}">
    <span th:text="*{id}"></span>
    <span th:text="*{name}"></span>
</div>

<br/>#if<br/>
<a th:if="${userPO == null}">if (false)</a>
<a th:if="${userPO != null}">if (true)</a>
<a th:unless="${userPO == null}">unless (false)</a>
<a th:unless="${userPO != null}">unless (true) </a>

<br/>#foreach<br/>
<table border="1px">
    <tbody>
    <tr th:each="userPO:${users}">
        <td th:text="${userPO.id}"></td>
        <td th:text="${userPO.name}"></td>
    </tr>
    </tbody>
</table>
</body>
</html>